package com.lq.educationsystem.student.entiy;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName student_tb
 */
@Data
public class StudentTb implements Serializable {
    /**
     * 学生id
     */
    private Integer studentId;

    /**
     * 学生姓名
     */
    private String studentName;

    /**
     * 学生登录账号
     */
    private String studentAccount;

    /**
     * 学生学号
     */
    private String studentXueHao;

    /**
     * 学生密码
     */
    private String studentPassword;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StudentTb other = (StudentTb) that;
        return (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getStudentName() == null ? other.getStudentName() == null : this.getStudentName().equals(other.getStudentName()))
            && (this.getStudentAccount() == null ? other.getStudentAccount() == null : this.getStudentAccount().equals(other.getStudentAccount()))
            && (this.getStudentXueHao() == null ? other.getStudentXueHao() == null : this.getStudentXueHao().equals(other.getStudentXueHao()))
            && (this.getStudentPassword() == null ? other.getStudentPassword() == null : this.getStudentPassword().equals(other.getStudentPassword()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getStudentName() == null) ? 0 : getStudentName().hashCode());
        result = prime * result + ((getStudentAccount() == null) ? 0 : getStudentAccount().hashCode());
        result = prime * result + ((getStudentXueHao() == null) ? 0 : getStudentXueHao().hashCode());
        result = prime * result + ((getStudentPassword() == null) ? 0 : getStudentPassword().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", studentId=").append(studentId);
        sb.append(", studentName=").append(studentName);
        sb.append(", studentAccount=").append(studentAccount);
        sb.append(", studentXueHao=").append(studentXueHao);
        sb.append(", studentPassword=").append(studentPassword);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}